import Vue from 'vue';
import App from './App';

Vue.config.productionTip = false;

App.mpType = 'app';

// 引入全局uView
import uView from 'uview-ui';
Vue.use(uView);



import {
	$copy,
	$url,
	$back,
	$request,
	$get,
	$post,
	$put,
	$delete,
	$log,
	$alert,
	$confirm,
	$fail,
	$to
} from "./untils/main.js";

$copy(
	Vue.prototype, {
		$copy,
		$url,
		$back,
		$request,
		$get,
		$post,
		$put,
		$delete,
		$log,
		$alert,
		$confirm,
		$fail,
		$to
	}
);
// 引入uView对小程序分享的mixin封装
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
Vue.mixin(mpShare);

const app = new Vue({
	...App
});

// http拦截器，将此部分放在new Vue()和app.$mount()之间，才能App.vue中正常使用
import httpInterceptor from '@/common/http.interceptor.js';
Vue.use(httpInterceptor, app);

app.$mount();
